#！usr/bin/env python3
#-*- coding:utf-8 -*-
def bubbleSort(S):
    length=len(S)
    for i in range(length):
        for j in range(length-1):
            if S[j]>S[j+1]:
                S[j], S[j + 1]=S[j+1],S[j]
                pass
            pass
        pass
    return S
    pass


if __name__=='__main__':
    S = [90, 310, 50, 4, 6, 9, 7, 50]
    newS = bubbleSort(S)
    print(newS)